﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <head>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
        <meta content="history" name="save">
        <title>SA1208: SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives</title>
        <link rel="stylesheet" type="text/css" href="stylesheets/helpstudio.css"><link rel="stylesheet" type="text/css" href="styles/Presentation.css">
        <script src="script/helpstudio.js" type="text/javascript"></script>
        <script src="script/StandardText.js" type="text/jscript"></script>
    </head>
    <body id="hsbody">
        <input type="hidden" id="userDataCache" class="userDataStyle" name="userDataCache" />
        <div id="allHistory" class="saveHistory" onsave="saveScrollPosition()" onload="loadScrollPosition()"></div>
        <script type="text/jscript">WritePageTop(document.title);</script>
        <div id="pagebody">
            <div id="mainbody">
                <table>
                    <col />
                    <tr><td><p>TypeName</p></td><td><p>SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives</p></td></tr>
                    <tr><td><p>CheckId</p></td><td><p>SA1208</p></td></tr>
                    <tr><td><p>Category</p></td><td><p>Ordering Rules</p></td></tr>
                </table>           
                <h2>Cause</h2>
                <P>A using directive which declares a member of the <EM>System</EM> namespace appears after a using directive which declares a member of a different namespace, within a C# code file.</P>
                <H2>Rule Description</H2>
                <P>A violation of this rule occurs when a using directive for the <EM>System</EM> namespace is placed after a non-<EM>System</EM> using directive. Placing all <EM>System</EM> using directives at the top of the using directives can make the code cleaner and easier to read, and can help make it easier to identify the namespaces that are being used by the code.</P>
                <H2>How to Fix Violations</H2>
                <P>To fix an instance of this violation, place the <EM>System</EM> using directive above all using directives for other namespaces.</P>
                <h2>How to Suppress Violations</h2>
                <pre>[SuppressMessage("StyleCop.CSharp.OrderingRules", "SA1208:SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives", Justification = "Reviewed.")]</pre>
            </div>
        <script type="text/jscript">WritePageFooter();</script> 
        </div>
    </body>
</html>